<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>房屋信息列表</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/tip.css}"/>
    <script type="text/javascript" th:src="@{/js/androidwheel/androidwheel.js}"></script>
    <script type="text/javascript" th:src="@{/js/layer/tip.js}"></script>
</head>
<body class="no-skin">
<div th:replace="common/top"/>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"/>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"/>
            <div class="page-content">
                <div th:replace="common/skin"/>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <h3 class="header smaller lighter blue"><i class="fa fa-list" aria-hidden="true"></i>房屋信息列表</h3>
                        <form id="form" name="form" th:action="@{/rentingHouse/getAll}" th:method="post"
                              th:object="${rentingHouseForm}">
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span2">
                                    <a shiro:hasPermission="/rentingHouse/add" class="btn btn-info"
                                       th:href="@{/rentingHouse/add}"><i class="fa fa-plus"
                                                                         aria-hidden="true"></i>添加</a>
                                    <button shiro:hasPermission="/rentingHouse/deleteAll" type="button"
                                            class="btn btn-danger"
                                            th:onclick="'deleteAll(\'/rentingHouse/deleteAll\');'"><i
                                            class="fa fa-times" aria-hidden="true"></i>删除
                                    </button>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span4">
                                            <span class="input_text">出租价格:</span>
                                        </div>
                                        <div class="span8">
                                            <select th:field="*{price}" id="price" name="price" class="input_fix">
                                                <option value="">全部</option>
                                                <option value="1">500-1000</option>
                                                <option value="2">1000-2000</option>
                                                <option value="3">2000-5000</option>
                                                <option value="4">5000+</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span4">
                                            <span class="input_text">支付类型:</span>
                                        </div>
                                        <div class="span8">
                                            <select th:field="*{priceType}" id="priceType" name="priceType"
                                                    class="input_fix">
                                                <option value="">全部</option>
                                                <option th:each="type : ${T(xyz.ibenben.zhongdian.system.entity.enums.PayTypeEnum).values()}"
                                                        th:value="${type}" th:text="${type.text}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span4">
                                            <span class="input_text">联系电话:</span>
                                        </div>
                                        <div class="span8">
                                            <input type="text" name="phone" id="phone" class="input_fix"
                                                   placeholder="联系电话" th:value="*{phone}" maxlength="20"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span2">
                                            <span class="input_text">标题:</span>
                                        </div>
                                        <div class="span10">
                                            <input type="text" name="title" id="title" class="input_fix"
                                                   placeholder="标题" th:value="*{title}" maxlength="20"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <button class="btn btn-info" style="float: right;" type="button"
                                            onclick="pagechange(1);"><i class="fa fa-search"
                                                                        aria-hidden="true"></i>查询
                                    </button>
                                </div>
                            </div>
                            <table class="table">
                                <thead>
                                <tr>
                                    <td class="center" style="width:80px;"><label><a href="javascript:void(0);"
                                                                                     th:onclick="'selectAll(this)'">全/不选</a></label>
                                    </td>
                                    <td>房屋所有人</td>
                                    <td class="hidden-480">出租价格</td>
                                    <td class="hidden-480">支付类型</td>
                                    <td class="hidden-480">租金包含费用</td>
                                    <td class="hidden-480">联系电话</td>
                                    <td class="hidden-480">装修风格</td>
                                    <td class="hidden-480">提供服务</td>
                                    <td class="hidden-480">标题</td>
                                    <td>操作</td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="house: ${rentingHouseList}">
                                    <td class="center"><label><input type="checkbox" name="selectids"
                                                                     th:value="${house.id}"/><span
                                            class="lbl">&nbsp;</span></label></td>
                                    <td th:text="${house.owner}"></td>
                                    <td class="hidden-480"
                                        th:text="${#numbers.formatDecimal(house.price, 1, 2) + '元/月'}"></td>
                                    <td class="hidden-480" th:text="${house.priceType.text}"></td>
                                    <td class="hidden-480" th:text="${house.includeService}"></td>
                                    <td class="hidden-480" th:text="${house.phone}"></td>
                                    <td class="hidden-480" th:text="${house.fitment}"></td>
                                    <td class="hidden-480" th:text="${house.supply}"></td>
                                    <td class="hidden-480" th:text="${house.title}"></td>
                                    <td>
                                        <a shiro:hasPermission="/rentingHouse/edit" href="#"
                                           class="btn btn-warning btn-minier"
                                           th:href="@{'/rentingHouse/edit?id=' + ${house.id}}" th:text="修改">修改</a>
                                        <a shiro:hasPermission="/rentingHouse/delete" href="#"
                                           class="btn btn-danger btn-minier"
                                           th:href="@{'/rentingHouse/delete?id=' + ${house.id}}" th:text="删除">删除</a>
                                        <a shiro:hasPermission="/rentingHouse/view" href="#"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/rentingHouse/view?id=' + ${house.id}}" th:text="查看详情">查看详情</a>
                                        <a shiro:hasPermission="/stuffInfo/add" href="#"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/stuffInfo/add?id=' + ${house.id}}" th:text="添加物品">添加物品</a>
                                        <a shiro:hasPermission="/houseImage/upload" href="#"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/houseImage/rentingHouse/upload?id=' + ${house.id}}"
                                           th:text="上传图片">上传图片</a>
                                    </td>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="10">
                                        <div class="row-fluid" th:replace="common/page"/>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"/>
</div><!-- /.main-container -->
<div th:replace="common/buttom"/>
<div th:replace="common/layer"/>
</body>
</html>
